This invention relates to a rotary encoder for measuring the rotary angle and number of rotation of a rotary shaft. More particularly, the present invention relates to the construction of detectors of the rotary encoder.
The rotary encoder (which hereby denotes an optical incremental rotary encoder) generates pulse trains proportional to the rotary angle when an input rotary shaft is rotated. The rotary encoder consists principally of a rotary shaft, a rotary slit disk fitted to the rotary shaft and a light emitting element and detectors opposing each other while interposing the rotary slit disk between them and fixed to a part of a housing in the non-contactive arrangement with respect to the rotary slit disk. The rotary slit disk is equipped with slits or dark and bright portions over its entire circumference as depicted in FIG. 1. The fixed detectors disposed in the proximity of the rotary slit disk detect changes in the light quantity passing through the rotary slit disk and the rotary encoder provides a signal in accordance with the rotation of the rotary shaft. At least two detectors must be disposed in order to distinguish the directions of rotation. Hence, the two detectors are disposed at different positions of the rotary slit disk, and two output pulses A and B whose phases are deviated by 90.degree. in terms of electric angle, as shown in FIG. 2, are obtained from the detecting signals of the respective detectors.
FIG. 3 typically shows a circuit construction to obtain the output pulses from the detecting signals. Each channel A, B has the same circuit construction. The signal, which is like a sine wave and is detected by each detector, is amplified by an amplification circuit to a predetermined amplitude and after waveform shaping by a comparison circuit, the output pulse A, B can be obtained.
FIG. 4 shows the conventional two methods of disposing the detectors. FIG. 4A shows the arrangement in which the detectors a, b are arranged in the radial direction of the rotary slit disk 1 while FIG. 4B shows the arrangement in which the detectors a, b are arranged in the circumferential direction. In order to provide a phase difference of 90.degree. in terms of electric angle, the two detectors a, b are fitted in practice at the positions relatively deviated by 1/4 with respect to one period of the slit, as shown in FIGS. 5A and 5B. These drawings are schematic enlarged views and since the number of slits of the rotary slit disk is practically about 1,000, the deviation quantity corresponding to the 1/4 period described above is an extremely small value. In addition, since the signal from only one position of the slit is not sufficiently strong, a mask M such as shown in FIG. 6 is disposed in front of each detector in order to obtain signals of the same phase from a large number of adjacent slits and thus to improve the detection sensitivity.
In the conventional rotary encoder of the kind described above, the two detectors must be disposed at the mutually different positions. For this reason, a phase error is likely to occur if fitting of the rotary slit disk to the rotary shaft is not complete and eccentricity exists. The phase error also occurs if there is an error in the set position of each detector.
FIG. 7 schematically illustrates the cause for the occurrence of the phase error when eccentricity exists in the rotary slit disk 1. FIG. 7A shows the case in which the detectors a, b are disposed in the radial direction in the same way as in FIG. 4A and FIG. 7B shows the case in which they are disposed in the circumferential direction in the same way as in FIG. 4B. In the drawings, symbol O represents the center of rotation of the rotary slit disk 1, O' is the center of the rotary slit disk, .epsilon. is an eccentric value and R.sub.1, R.sub.2, R, .phi..sub.e1, .phi..sub.o, and .phi..sub.d represent the dimension and angles shown in the drawing. (Hereinafter, the unit angle will be [rad].) In FIG. 7A, the maximum value .phi..sub.p1 of the phase error expressed in terms of electric angle is given by the following formula using the geometric phase error angle .phi..sub.e1 with N representing the number of slits of the rotary slit disk 1: EQU .phi..sub.p1 =N.multidot..phi..sub.e1 ( 1)
From the geometric relation, since .phi..sub.e1 is given by the following formula: ##EQU1## .phi..sub.p1 can be obtained by the following formula: ##EQU2##
On the other hand, in the arrangement shown in FIG. 7B, the geometric phase error angle .phi..sub.e2 is given by the formula: EQU .phi..sub.e2 =.phi..sub.d -.phi..sub.o ( 4)
The maximum value .phi..sub.p2 of the phase error in terms of electric angle is given by: ##EQU3## Incidentally, FIGS. 7A and 7B show the arrangement in which the phase error becomes maximum but when the center of the rotary slit disk moves to O" in the drawings, too, the phase error occurs in the quantity expressed by the formulas above but with the opposite polarity.
FIG. 8A shows the waveform when the waveform is observed by an oscilloscope or the like using one A of the output signals as the reference. In this case, the signal B exhibits irregularity of waveform which changes with a width .+-..phi..sub.p (the maximum values .phi..sub.p1, .phi..sub.p2 of the phase error) with its center located at the point where the phase becomes 90.degree.. FIG. 9 shows the waveform when the set positions of the detectors deviate from each other (with the proviso that the rotary slit disk is free from eccentricity). A phase deviation .phi. corresponding to the deviation quantity of the mutual set positions of the detectors delivering the two signals A and B appears constantly. When both eccentricity and error of set positions co-exist, therefore, the irregularity of waveform and the phase deviation are synthesized and appear simultaneously.
If the irregularity of waveform and the phase deviation described above occur, the accuracy of the detecting signals drops and in an extreme case, the pulse interval becomes so narrow that the response speed of a signal processing circuit at a posterior stage can not follow up the pulses and miscounting would occur. If a signal C is generated by utilizing the state change points of the two signals A, B as shown in FIG. 10 and count is effected at a division rate four times the nominal value, the pulse interval of the resulting signal becomes further smaller so that the adverse influence exterted by the phase error becomes all the more critical.
FIG. 11 shows the signal when count is effected at the division rate of four times as described above when the irregularity of waveform exists. Since the pulse interval between the signals A and B drastically changes, the pulse gap of the signal C synthesized from these two signals A, B is not constant and if an extremely narrow portion locally exists, a controller receiving the output of the rotary encoder as its input signal can not respond to the signal.
The problem described above primarily results from the eccentricity of the rotary slit disk and the error of set positions of the detectors during assembly of the rotary encoder. This problem has been solved conventionally only by adjustment and the time and labor necessary for this adjustment is tremendous. If an amateur without high skill of the rotary encoder assembles a kit encoder, he can never make a high level of adjustment and the signal accuracy unavoidably drops.